<% include ../header.ejs %>
<style>
    .legend{
        display: block;
        width: 100%;
        margin-bottom: 1rem;
        font-size: 2rem;
        line-height: inherit;
        color: #888181;
        border-bottom: 1px solid #e5e5e5;
    }
</style>
<div ng-app="dealEdit" ng-controller="dealEditController">
<header data-am-widget="header" data-am-sticky class="am-header am-header-default" id="appTemplates-Nav">
    <div class="am-header-left am-header-nav">
        <a href='javascript:history.go(-1)' class="">
            <img class="am-header-icon-custom" src="data:image/svg+xml;charset&#x3D;utf-8,&lt;svg xmlns&#x3D;&quot;http://www.w3.org/2000/svg&quot; viewBox&#x3D;&quot;0 0 12 20&quot;&gt;&lt;path d&#x3D;&quot;M10,0l2,2l-8,8l8,8l-2,2L0,10L10,0z&quot; fill&#x3D;&quot;%23fff&quot;/&gt;&lt;/svg&gt;" alt=""/>
        </a>
    </div>

    <h1 class="am-header-title">
        <a href="#title-link" class="" id="Typeface-whitecolor">交易信息</a>
    </h1>

    <div class="am-header-right am-header-nav">
        <a id="a_save" ng-click="createOrUpdate()" class="" data-am-modal="{target: '#modal-type-add', closeViaDimmer: 0, width: 240, height: 260}">保存</a>
    </div>
</header>

<form name="addstockrecommend" class="am-form" method="post" action="save" data-am-validator>
    <fieldset>
        <span class="legend">{{typeName}}<p class= "am-margin-left-sm" ng-class = "typeName == '买入'?'am-icon-cart-arrow-down':'am-icon-sign-out'"></p></span>
        <div class="am-form-group">
            <label>股票代码</label>
            <select class="company-data-ajax" style="width: 100%" placeholder="输入股票代码"  ng-model="deal.stockId" required>

            </select>
        </div>
        <div class="am-form-group">
            <label >{{typeName}}时间</label>
            <input type="text" class="am-form-field" placeholder="选择时间" readonly data-am-datepicker   id="dealDate" required/>

        </div>
        <div class="am-form-group">
            <label >{{typeName}}金额</label>
            <input type="text"   placeholder="输入金额" required ng-model="deal.price">
        </div>
        <div class="am-form-group">
            <label >{{typeName}}数量</label>
            <input type="text"   placeholder="输入数量" required  ng-model="deal.num">
        </div>

        <!--<div class="am-form-group">-->
            <!--<label >最新成本</label>-->
            <!--<input type="text"   placeholder="输入成本" required  ng-model="deal.cost">-->
        <!--</div>-->
        <!--<div class="am-form-group">-->
            <!--<label >最新持有量</label>-->
            <!--<input type="text"   placeholder="输入持有量" required  ng-model="deal.positionNum">-->
        <!--</div>-->
        <div class="am-form-group">
            <label for="doc-vld-name">{{typeName}}说明:</label>
            <textarea class="" rows="5" id="doc-ta-1" name = "content" ng-model = "deal.reason"></textarea>

        </div>

    </fieldset>
</form>
    <div class="am-modal am-modal-alert" tabindex="-1" id="my-alert">
        <div class="am-modal-dialog">
            <div class="am-modal-hd">
                <!--<p class="am-icon-btn am-warning am-icon-warning"></p>{{title}}-->
            </div>
            <div class="am-modal-bd">
                {{message}}
            </div>
            <div class="am-modal-footer">
                <span class="am-modal-btn" ng-click="back()">确定</span>
            </div>
        </div>
    </div>
</div>
<script>
    var type = '<%=type%>';
    var groupId = '<%=groupId%>';
</script>
<script src="/javascripts/app/stockdeal/edit.js"></script>


<% include ../footer.ejs %>